﻿using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Dal
{
    public class LoginDal
    {
        public LoginDal(MyContext context)
        {
            Context = context;
        }

        public MyContext Context { get; }

        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="Name">用户名</param>
        /// <param name="Pwd">添加</param>
        /// <returns></returns>
        public Login GetLogin(string Name,string Pwd)
        {
            Login info=Context.Logins.Where(x=>x.Name==Name&&x.Pwd==Pwd).FirstOrDefault();
            return info;
        }
    }
}
